Disk
An object of class Disk is any mounted volume on the desktop. In addition to hard disks and floppy disks, objects of class Disk can include RAM disks, tape drives, CD-ROM disks, and other storage devices.PROPERTIES
A disk has all the properties defined for object class Sharable Container
on page 78: Exported, Group, Group Privileges, Guest Privileges,
Inherited Privileges, Mounted, Owner, Owner Privileges, Protected,
Shared, Sharing Window.Like any other sharable container, a disk also has all the properties defined
for object class Container on page 42: Completely Expanded, Container Window, Entire Contents, Expandable, Expanded, Previous List View, Selection, and View.In addition, like any other container, a disk has all properties defined for object class Item on page 72: Bounds, Comment, Container, Content Space, Creation Date, Disk, Folder, Icon, ID, Information Window, Kind, Label Index, Modification Date, Name, Physical Size, Position, Selected, Size, and Window.
Unlike other sharable containers or containers, a disk also has the following properties:
capacity
- The total number of bytes that can fit on the disk.
Class: Integer
Modifiable: Noejectable
- A Boolean value that indicates whether the disk can be ejected or put away (
true
) or not (false
).
Class: Boolean
Modifiable: Nofree space
- The total number of bytes of free space remaining on the disk.
Class: Integer
Modifiable: Nolocal volume
- A Boolean value that indicates whether the disk is a local (
true
) or remote (false
) volume.
Class: Boolean
Modifiable: Nostartup
- A Boolean value that indicates whether a disk is the startup
disk (true
) or not (false
).
Class: Boolean
Modifiable: NoELEMENT CLASSES
Objects of the classes listed here can be identified at the top level of a disk by name or by number. Page numbers indicate the location of corresponding definitions in this chapter.
- Accessory Suitcase (page 27)
- Alias File (page 28)
- Application File (page 38)
- Container (page 42)
- Control Panel (page 51)
- Desk Accessory File (page 54)
- Document File (page 59)
- File (page 60)
- Folder (page 62)
- Font File (page 64)
- Font Suitcase (page 65)
- Item (page 72)
- Sharable Container (page 78)
- Sound File (page 86)
- Suitcase (page 88)
COMMANDS HANDLED
Clean Up, Close, Copy, Count, Data Size, Delete, Duplicate, Exists, Get, Open, Put Away, Reveal, Select, Sort, UpdateDEFAULT VALUE CLASS RETURNED
Reference to a file or, if you use the plural formdisks
, a list of references.EXAMPLE
The script that follows tests the Ejectable property of each item in a list of the mounted disks and ejects every disk that's ejectable.
tell application "Finder" put away (every disk whose ejectable is true) end tell